<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>基础数据管理-业务类型</title>
    <script src="/scripts/boot.js"></script>
     
</head>
<body class="bg-white">
<div id="viewForm">
	
<!-- 	//<input id="info" type="hidden" value="" /> -->

	<iframe id="iframeInfo"  src="" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" width="100%" frameborder="0" height="500"></iframe>
</div>
    <div class="chose-toolbar">
        <a class="chose-button" onclick="CloseWindow('close')">取消</a>
        <a class="chose-button save-button" onclick="view.save()">保存</a>
    </div>
<script type="text/javascript">
document.domain="localhost";
		var form;
		 var view = {
      	  init: function () {
            mini.parse();
            form = new mini.Form("#viewForm");          
            $.ajax({
                url:"/item/getUserInfo",
                type: "post",
                success: function (text) {
        	    	$('#iframeInfo').attr('src','http://localhost:8083/a/sys/out/userSelector?'+'&user_id='+text.id+'&token='+text.token);
                }
            }); 
        },
       save: function () {
		      	debugger
		      	var userInfo =	document.getElementById('iframeInfo').contentWindow.test();
		      	var userNum =	userInfo.length;
		      	if(userNum!=1){
		      		mini.alert("请选择一位负责人!");
		      		return ;
		      	}
		      	window.localStorage.setItem('data',userInfo);//存
		      	$(".mini-icon mini-iconfont fa mini-tools-close").trigger('click');
	       },
	         
    };
    view.init();
		
		
		</script>
</body>
</html>